//
//  StreetWorkService.m
//  homeland
//
//  Created by Alawn on 13-10-21.
//  Copyright (c) 2013年 xzysun. All rights reserved.
//

#import "StreetWorkService.h"
#import "StreetInfoCell.h"
#import "StreetWorkEntity.h"
@implementation StreetWorkService
-(id)init
{
    self = [super init];
    if (self) {
        _dataItemName = @"StreetWorkEntity";
    }
    return self;
}
-(void)loadDataWithKey:(NSString *)keyOrNil
{
    _currentPageNo = 1;//刷新或查询的时候将请求页码变为1
    if (self.dataList) {
        self.dataList = nil;
    }
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
     [params setValue:@"" forKey:@""];
     [self doHttpPost:SERVER_URL_PEOPLE_ORG_LIST headers:nil path:@"" parameters:nil];
}

-(void)loadMoreDataWithKey:(NSString *)keyOrNil
{
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    [params setValue:@"" forKey:@""];
   [self doHttpPost:SERVER_URL_PEOPLE_ORG_LIST headers:nil path:@"" parameters:nil];
}

-(void)configCell:(UITableViewCell *)cell atIndex:(NSIndexPath *)index
{
    StreetWorkEntity *item = [self.dataList objectAtIndex:index.row];
    StreetInfoCell *tempCell = (StreetInfoCell *)cell;
    tempCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    tempCell.titleLabel.text = item.name;
}

-(NSDictionary *)getTargetConfigForCellAtIndex:(NSIndexPath *)indexPath
{
    StreetWorkEntity *item = [self.dataList objectAtIndex:indexPath.row];
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"街道办事指南列表",@"key",item,@"dataItem", nil];
    return dic;
}
@end
